﻿require(["avalon", "jquery"], function () {
    var vm = avalon.define({
        $id: "home_index",
        keyword: "",
        hasData:false,
        showData:"hidden",
        recommendCommodities:[],
        search: function () {
            alert(vm.keyword)
        }
    });
    $.get("GetRecommendCommodities" + "?r=" + Math.random(), function (data) {
        if (data) {
            vm.hasData = true;
            vm.showData = "show";
            vm.recommendCommodities = data;
        }
    });
});